# #7-5 杨辉三角形【组合数据类型】
def yh_triangle(rows):
    triangle=[]
    for i in range(rows):
        row=[1]*(i+1)
        if i >1:
            for j in range(1, i):
                row[j] = triangle[i - 1][j - 1] + triangle[i - 1][j]
        triangle.append(row)
    for r in triangle:
        for i in r:
            print(i,end=" ")
        print()
s=10
yh_triangle(s)